package com.example.myapplication;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

import com.example.myapplication.base.BaseActivity;
import com.example.myapplication.dialogs.ForceDailog;
import com.example.myapplication.utils.LogUtils;
import com.example.myapplication.services.NettyStatusService;

import java.util.List;

public class MainActivity extends BaseActivity {

    private List<String> listStr;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        LogUtils.setISLogCat(true);
//        listStr = null;
//        if(listStr==null||listStr.size()==0){
////            listStr.add("hello");
//            Log.i("dove","into--"+listStr);
//        }
//        Log.i("dove","pass");
//        LogUtils.i("dove", TimeUtils.getTime(System.currentTimeMillis()));

        mytest1();
    }

    private void mytest1() {
        switch (1){
            case 0:
                Log.i("dove","s000000------------");
                break;
            case 1:
                Log.i("dove","s11111------------");
                if(true){
                    Log.i("dove","start1111------------");
                    if (true){
                        Log.i("dove","start2222------------");
                        return;
                    }
                    Log.i("dove","end1111------------");
                }
                Log.i("dove","end------------");
                break;
            case 2:
                Log.i("dove","s22222------------");
                break;
        }
        Log.i("dove","endsssss---------");
    }

    public void mytest(){
        if(true){
            Log.i("dove","start1111------------");
            if (true){
                Log.i("dove","start2222------------");
                if(true){
                    Log.i("dove","start3333------------");
                    if(true){
                        Log.i("dove","start4444------------");
                        return;
                    }
                    Log.i("dove","end3333------------");
                }
                Log.i("dove","end2222------------");
            }
            Log.i("dove","end1111------------");
        }
        Log.i("dove","end------------");
    }

    public void show(View view){
        ForceDailog.init().showDailog(mContext,mActivity);
    }

    /**
     * netty连接
     */
    public void netty_connection(View view) {
        //启动状态监听心跳
        Intent serviceIntent = new Intent(mContext, NettyStatusService.class);
        startService(serviceIntent);
    }
}
